package dev.wanheng.springjwtlogin.mapper;
import org.apache.ibatis.annotations.Param;

import dev.wanheng.springjwtlogin.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
* @author yao
* @description 针对表【user】的数据库操作Mapper
* @createDate 2024-06-24 09:29:06
* @Entity generator.domain.User
*/
@Service
@Transactional
public interface UserMapper extends BaseMapper<User> {
    User findOneByUsername(@Param("username") String username);

    @Select("SELECT * FROM user WHERE phoneNumber = #{phone}")
    User findOneByPhone(@Param("phone") String phone);
}